package com.svms.utils;

import java.util.Map;

import org.zkoss.zk.ui.event.CreateEvent;
import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.ForwardEvent;

public class SvmsWindowUtils {

	/**
	 * Maps the arguments forwarded from the calling screen
	 * 
	 * @param event
	 * @return
	 */
	@SuppressWarnings("unchecked")
	public static Map<String, Object> getCreationArgsMap(Event event) {
		final CreateEvent ce = (CreateEvent) ((ForwardEvent) event).getOrigin();
		return (Map<String, Object>) ce.getArg();
	}

}
